package com.kzhkwkt.lifecycle;

import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;
import android.widget.Toast;

public class Main extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	toast("onCreate in");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    @Override
    public void onStart() {
    	toast("onStart in");
    	super.onStart();
    }

    @Override
    public void onResume() {
    	toast("onResume in");
    	super.onResume();
    }

    @Override
    public void onRestart() {
    	toast("onRestart in");
    	super.onRestart();
    }

	@Override
	public void onPause() {
		toast("onPause in");
		super.onPause();
	}

	@Override
	public void onStop() {
		toast("onStop in");
		super.onStop();
	}

	@Override
	public void onDestroy() {
		toast("onDestroy in");
		super.onDestroy();
	}

	@Override
	public void onSaveInstanceState(Bundle outState) {
		toast("onSaveInstanceState in");
		super.onSaveInstanceState(outState);
	}

	@Override
	public void onRestoreInstanceState(Bundle savedInstanceState) {
		toast("onRestoreInstanceState in");
		super.onRestoreInstanceState(savedInstanceState);
	}

	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		toast("onConfigurationChanged in");
		super.onConfigurationChanged(newConfig);
	}


    void toast(String message) {
    	Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
    }
}